package vip.meeet.start;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import vip.meeet.config.EnvironmentDevConfig;
import vip.meeet.config.EnvironmentProConfig;

public class EnvironmentStart {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(EnvironmentDevConfig.class, EnvironmentProConfig.class);
        ConfigurableEnvironment environment = context.getEnvironment();
//        environment.setActiveProfiles("dev");
        environment.setActiveProfiles("pro");
        System.out.println(environment.getProperty("env"));
    }
}
